
const express = require('express')

const router = express.Router()

const articles_handler = require('../router_handler/articles')

// 导入验证数据合法性的中间件
const expressJoi = require('@escook/express-joi')

const {add_article_schema} = require('../schema/article')

router.post('/add',expressJoi(add_article_schema),articles_handler.addArticle)

router.get('/list',articles_handler.selectArticle)

module.exports = router
